home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / HYPERCAR / BUTTONS_ / HYPERCAR.D_I < prev    next >
Text File  |  1990-03-31  |  5KB  |  32 lines

  1. Buttons and ICONs
  2.  
  3. Like most people, I've only been using HyperCard for a short while. I think it's a fantastic concept, and have jumped right into creating stacks.
  4.  
  5. I've noticed something that I feel needs to be pointed out to people, since I haven't run across it in the documentation or in Danny Goodman's book, "The Complete HyperCard Handbook" (by the way, if you have HyperCard and don't have this book, I recommend getting a copy!)
  6.  
  7. The problem I want to describe is not a bug in HyperCard, and needs only to be understood to be avoided. I've already seen a couple examples of this problem, in stacks I've downloaded. It's possible for somebody to create a stack that uses ICONs as buttons, and for other users of the stack to have these ICONs missing, or in some cases, different ICONs than the author intended.
  8.  
  9. This has to do with ICON resources and HyperCard buttons, so first, a little background:
  10.  
  11. HyperCard allows ICON resources to be used as button graphics. When you create a button, you can select an ICON from a scrolling window, and this ICON becomes attached to the button. Now, it's important to know exactly where a specific ICON itself is coming from when choosing it to be your button graphic. HyperCard comes with several ICONs already installed in the application itself, and these ICONs are available to every stack. Each ICON has it's own resource ID, and it is this ID number that HyperCard uses to keep track of which ICONs belong to which buttons. (If you look at the 'Button Info' window in HyperCard, you can see the ID number of the ICON, if the button has one.)
  12.  
  13. HyperCard comes with several ICONs already installed in the application's resource fork. Each ICON has it's own ID and every HyperCard program has these same ICONs, with the same ID numbers. This makes it safe for any stack to use any of these ICONs, since they are installed in every HyperCard application. (This assumes that these ICONs haven't been tampered with by the user. It's not a very good idea to delete any of these ICONs or to change their ID numbers with ResEdit.)
  14.  
  15. Other than the ICONs that come with HyperCard, you may install additional ICON resources yourself. This adds ICONs to the window in HyperCard when choosing one for a button, giving a larger choice. You can do this with ResEdit, or one of many other utilities available. (Note: do not install ICN# resources! ICN# resources are used by the Finder, and several other programs. This type of resource is actually a collection of icons, and is can not be used by HyperCard for buttons. There are utilities that will convert ICN# resources into ICON resources, so you may want to get one of these.)
  16.  
  17. Now, the missing ICON problem occurs when you create a stack that uses custom ICONs for buttons. When you add ICON resources to your HyperCard application, everything will work well for you. However, when another user opens your stack, the custom ICONs are missing, or are sometimes replaced by other icons! This is because you have the ICONs in your HyperCard application, but other user's don't! (Even if they DO have the same icons, it's very unlikely that they will have the same ID numbers.)
  18.  
  19. I've found that this is a very easy mistake to make. It's impossible to tell where the ICON resource is, just by looking at the ICON in HyperCard. This causes the stack author to get everything looking just right, without even a hint that it might look differently when run with another copy of HyperCard. One way to test for this is to run your stack with an unmodified version of HyperCard. (One that has had no ICONs added to it.)
  20.  
  21. It's VERY easy to avoid this problem. Simply put all the custom ICON resources into your stack file, instead of the application! When other people run your stack, HyperCard will find the ICON. As I've said, this problem is easily avoided when you're aware of it. For a lot of us, it is a little detail that can easily slip by, without being noticed.
  22.  
  23. Also, when you paste a button with a custom ICON into the Home card, or into another stack, the ICON resource is transfered too! Make a button for your help card with a custom ICON, so that people can paste it into their Home card to get to your stack quickly! ICON buttons are attractive and very convenient, since you can easily move/copy/paste the button! Use ResEdit and other utilities to copy and create ICONs and paste them into your stacks to make them look slick and professional!
  24.  
  25. Now, just because I haven't run across this in any documentation, this doesn't mean it isn't written down somewhere. I'm taking a 'hands-on' approach to HyperCard, as many people do, referring to the books when I can't get something to work. This is why I want to point this problem out. The nature of this problem makes it possible for the creator of a stack to see nothing amiss, but for stack users to find a confusing problem.
  26.  
  27. Please feel free to send me any comments or questions. I'm certainly no expert, but am caught up in the wave of 'HyperMania!'
  28.  
  29. -James L. Paul [72767,3436]
  30.  
  31.  
  32.